package com.txhy.certificatechain.ui.widget;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;

/*
 * -----------------------------------------------------------------
 * Copyright (C) 2018-2030, by your company, All rights reserved.
 * -----------------------------------------------------------------
 * 文    件: IconFontTextView.java
 * 作    者: 侯建军
 * 版    权: 1.0.0
 * 描    述: 使用IConFont TextView
 * 创建时间: 2018/9/20 11:52
 * 更新时间：2018/9/20 11:52
 * -----------------------------------------------------------------
 * 2018/9/20 11:52: 创建 IconFontTextView.java (侯建军);
 * -----------------------------------------------------------------
 */
public class IconFontTextView extends android.support.v7.widget.AppCompatTextView {

    private Context mContext;

    public IconFontTextView(Context context) {
        super(context);
        mContext = context;
        initView();
    }

    public IconFontTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mContext = context;
        initView();
    }

    private void initView() {
        Typeface iconfont = Typeface.createFromAsset(mContext.getAssets(), "iconfont.ttf");
        setTypeface(iconfont);
    }
}

